export const DISCOUNT_STATUS = {
  0: '普通券',
  1: '会员赠送券',
  2: '活动券',
  3: '充值赠送券',
  4: '新人注册礼',
}

export const TYPE = {
  1: '我要洗衣券',
  2: '家电清洗券',
  3: '家政服务券',
  4: '家乐商城券'
}

export const GENRE = {
  0: '优惠券',
  1: '代金券'
}

export default {
  filters: {
    discountStatusFilter (key) {
      return DISCOUNT_STATUS[key]
    },
    disCountGenreFilter ({ genre, minus_price: minusPrice, full_price: fullPrice, discount }) {
      return genre === 1 ? GENRE[genre] + `(满${fullPrice}减${minusPrice})` : GENRE[genre] + `(${discount}折)`
    },
    typeFilter (key) {
      return TYPE[key]
    },
    nameFilter (type, discount) {
      return type + `(${discount}折)`
    },
    couponDiscountDisplay (discount) {
      return discount + '折'
    },
    GenreFilter (key) {
      return GENRE[key]
    }
  }
}
